<?php
namespace app\common\validate;
use think\Validate;


class Cardtype extends Validate
{

    /**
     * 'cardtypename'=>input('post.cardtypename'),
      *          'cardtypesoftware'=>input('post.cardtypesoftware'),
      *          'cardtypetype'=>input('post.cardtypetype'),
      *          'cardtypetime'=>input('post.cardtypetime'),
     */
    protected $rule=[
		'cardtypename|卡密类型名'=>'require|unique:cardtype',
        'cardtypesoftware|卡密对应程序'=>'require',
        'cardtypetype|卡密类型'=>'require',
		'cardtypetime|卡密类型时间'=>'require|number',
		'cardtype_key|卡密类型KEY'=>'require'	
    ];
    //添加场景 验证
	public function sceneAdd()
	{
		 return $this->only(['cardtypename','cardtypesoftware','cardtypetype','cardtypetime','cardtype_key']);
	}

    //编辑场景验证
    public function sceneEdit()
    {
        return $this->only(['cardtypename','cardtypesoftware','cardtypetype','cardtypetime']);
    }


}